package com.syl.proxy.interfaces;

import org.apache.http.HttpEntity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;

/**
 * 覆盖结果接口
 *
 * @author syl
 * @create 2019-08-06 19:06
 **/
public interface OverrideRule {

    /**
     * 是否访问网址
     * @return
     */
    default boolean isVisit(){
        return true;
    }

    /**
     * 覆盖结果回调
     * @return
     */
    String callback(String html, HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws IOException;

}
